package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-23
 * Time: 19:46
 */
public class Student extends Person implements Cloneable {

    public Student(String name, int age) {
        super(name, age);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public void eat() {
        System.out.println(this.name + " 正在吃饭!");
    }
}
